//
//  BaseCollectionView.h
//  GoldBook
//
//  Created by wmz on 2021/9/4.
//  Copyright © 2021 wmz. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface BaseCollectionView : UICollectionView<HDSkeletonLayerLayoutProtocol>
/// 需要刷新按钮
@property (nonatomic, assign) IBInspectable BOOL needRefreshBTN;
/// 需要下拉刷新
@property (nonatomic, assign) IBInspectable BOOL needRefreshHeader;
/// 需要上拉加载更多
@property (nonatomic, assign) IBInspectable BOOL needRefreshFooter;
/// 需要显示无数据占位
@property (nonatomic, assign) IBInspectable BOOL needShowNoDataView;
/// 需要显示网络错误占位
@property (nonatomic, assign) IBInspectable BOOL needShowErrorView;
/// 数据为空占位图配置模型
@property (nonatomic, strong) UIViewPlaceholderViewModel *placeholderViewModel;
/// 刷新按钮回调
@property (nonatomic, copy) void (^tappedRefreshBtnHandler)(void);
/// 下拉刷新回调
@property (nonatomic, copy) void (^requestNewDataHandler)(void);
/// 上拉加载更多回调
@property (nonatomic, copy) void (^requestMoreDataHandler)(void);
/// 分页页码
@property (nonatomic, assign) NSInteger pageNum;
/// 请求成功刷新
- (void)reloadData:(BOOL)isNoMore;
/// 请求失败刷新
- (void)reloadFail;
/// 是否有数据
- (BOOL)hd_hasData;
@end

NS_ASSUME_NONNULL_END
